package com.tougutips.like.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.data.annotation.Id;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName cookbook
 */
@TableName(value ="cookbook")
@Data
public class Cookbook implements Serializable {
    /**
     * 
     */
    @TableId
    @Id
    private Long id;

    /**
     * 菜谱封面
     */
    private String cover;

    /**
     * 菜谱名字
     */
    private String cookbookName;

    /**
     * 菜谱烹饪时长
     */
    private String cookbookTime;

    /**
     * 菜谱难度的id
     */
    private Long difficultType;

    /**
     * 菜谱所属分类的id
     */
    private Long categoryId;

    /**
     * 菜谱的访问量(暂定每个人点一次)
     */
    private Integer visits;

    /**
     * 菜谱的收藏数
     */
    private Integer collectors;

    /**
     * 点赞量
     */
    private Integer likes;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 逻辑删除
     **/
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer isDeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}